<?
	   layout("/inc/win_layout.html",{title:sysTitle}){
    ?>
<!-- <html lang="en">
<head>
  <meta charset="UTF-8">
  
</head>
<body> -->
<link rel="stylesheet" href="static/technological/layer/css/tuozhuai.css">
  <div class="mulu_edit">
    <div class="form-group">
      <label class="col-md-3 control-label">节点名称</label>
      <div class="col-md-9">
		<div class="input-icon">
			<input type="text" class="form-control" id="workflowNodeName">
		</div>
	</div>
 </div>
    <!-- <div class="form-group">
      <label>执行人</label>
      <select  class="form-control" name="">
        <option value="">请选择</option>
        <option value="">2</option>
      </select>
    </div> -->
    <div class="form-group" >
		<label for="inputUsername" class="col-md-3 control-label">执行人<span
		class='require'></span> </label>
		<div class="col-md-9">
			<div class="input-group input-group-sm mbs">
				<input id="organizationUserZh" type="text" placeholder="请选择用户" class="form-control" disabled="true" /> 
				<span class="input-group-btn">
				<button id="xuanze" onclick="saveMember()" type="button" data-toggle="dropdown" class="btn btn-success dropdown-toggle" style="height: 40px;">选择..</button>
				</span> 
				<input id="organizationUserid" type="hidden" value=""  class="form-control" />
			</div>
		</div>
	</div>
    <div class="form-group">
      <label class="col-md-3 control-label">节点描述</label>
		<div class="col-md-9">
			<div class="input-icon">
				<textarea class="form-control" id="nodeText"></textarea>
			</div>
		</div>
    </div>
  </div>
  <?} ?>
<!-- </body> -->
<script src="static/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
	function workflowNodeName() {
		var nodeName = $('#workflowNodeName').val();
	    return nodeName;
	};
	function nodeText() {
		var nodeText = $('#nodeText').val();
	    return nodeText;
	};
	function organizationUserZh() {
		var organizationUserZh = $('#organizationUserZh').val();
	    return organizationUserZh;
	};
	function GetQueryString(name){
	         var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	         var r = window.location.search.substr(1).match(reg);
	         if(r!=null)return  encodeURI(r[2]); return null;
	};
	$(function() {
		startedit();
	});
	function startedit(){
        var workflowNodeName = GetQueryString('workflowNodeName');
        var workflowID = GetQueryString('workflowID');
        var organizationUserZh = GetQueryString('organizationUserZh');
		$.ajax({
			type : "post",
			async : false,
			url : "./workflowNodeDataRetrieval.do",
			data : {
				"executor":decodeURI(decodeURI(workflowNodeName)),
				"workflowId":workflowID,
				"organizationUserZh":organizationUserZh
			},
			dataType : "json",
			success : function(data) {
			var aaa = data[0].wfnodeName;
				$('#workflowNodeName').val(data[0].wfnodeName);
				$('#organizationUserZh').val(data[0].wfCreateUser);
				$('#nodeText').val(data[0].wfNodeDescription);
			},
			error : function(data) {
				alert("请求失败");
			}
		});
	}
	function saveMember(){
		parent.layer.open({
			type : 2,
			area : [ '900px', '700px' ],
			fix : false, //不固定
			scrollbar : false,
			shadeClose : true,
			//move : false,
			title:"授权用户列表",
			skin : 'layui-layer-rim', //加上边框
			btn : [ '保存 ', '关闭' ],
			content : ["workflow-node-user.html?winName="+window.name, 'no'],
			yes : function(index,layer) {		
			var iframeWin = parent.window[layer.find('iframe')[0]['name']];
			  	iframeWin.save();
			},
			cancel : function(index) {
			}
		});
	
	}
</script>
</html>
